<div class="flex flex-col">
  <%= content_tag :div,data: { controller: 'nested-form', nested_form_wrapper_selector_value: '.nested-form-wrapper' } do %>
    <%= render Avo::PanelComponent.new(name: "Reviews", description: "Create some reviews for this fish") do |c| %>
      <% c.with_bare_content do %>
        <% if form.present? %>
          <template data-nested-form-target="template">
            <%= form.fields_for :reviews, Review.new, multiple: true, child_index: 'NEW_RECORD' do |todo_fields| %>
              <%= render "avo/partials/fish_review", f: todo_fields %>
            <% end %>
          </template>
          <div class="space-y-4">
            <% if false %>
              <%= form.fields_for :reviews, Review.new, multiple: true do |todo_fields| %>
                <%= render "avo/partials/fish_review", f: todo_fields %>
              <% end %>
            <% end %>
            <div data-nested-form-target="target"></div>
          </div>
        <% end %>
      <% end %>
      <% c.with_footer_tools do %>
        <div class="mt-4">
          <%= a_link 'javascript:void(0);', icon: "heroicons/outline/plus", color: :primary, style: :outline, data: {action: "click->nested-form#add"} do %>
            Add a review
          <% end %>
        </div>
      <% end %>
    <% end %>
  <% end %>
</div>
